<template>
  <div class="about">
    <h1>This is an argument page</h1>
    <div>{{$route.params.name}}</div>
    <div>{{name}}</div>
  </div>
</template>
<script>
export default {
  props: {
    name: {
      type: String,
      default: "",
    },
  },
  beforeRouteUpdate(to,from,next){
    //路由发生变化，组件是复用组件
    console.log('beforeRouteUpdate',to.name);
  }
};
</script>
